home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pov / povlisti.ngs / flyrod4.pov < prev    next >
Encoding:
Text File  |  1992-06-17  |  17.0 KB  |  506 lines

  1. // Persistence of Vision Raytracer
  2. // Flyrod & flyreel by Dan Farmer  May '92
  3. // 5 hours 17 min on 33/486 +a0.1 640x480
  4. #include "include.inc"
  5. #declare Bamboo1 = colour  red   1.00 green   0.78 blue   0.46
  6. #declare Bamboo2 = colour  red   0.97 green   0.82 blue   0.47
  7.  
  8.  
  9. camera {
  10.    location <0  0  -28>
  11.    direction <0.0 0.0  3.0>
  12.    up  <0.0  1.0  0.0>
  13.    right <1.33333 0.0 0.0>
  14.    look_at <-1.75 -3 0>
  15. }
  16.  
  17. object { light_source  { < 10  30 -30>  color White } }
  18. object { light_source  { <-200 150 -50>  color Gray75  } }
  19.  
  20. #declare Reel_Texture = texture {
  21.     0.1
  22.     specular 1
  23.     roughness 0.005
  24.     phong 1
  25.     phong_size 150
  26.     color Gray20
  27. }
  28.  
  29. #declare Nickle_Silver = texture {
  30.     0.25
  31.     Metal
  32.     color red 0.94 green 0.93 blue 0.83
  33. }
  34.  
  35.  
  36. #declare Cork = texture {
  37.     0.05
  38.     granite
  39.     colour_map {
  40.         [0.0 0.6  colour red 0.93 green 0.71 blue 0.532
  41.                   colour red 0.98 green 0.81 blue 0.60]
  42.         [0.6 0.65 colour red 0.50 green 0.30 blue 0.20
  43.                   colour red 0.50 green 0.30 blue 0.20]
  44.         [0.65 1.0 colour red 0.80 green 0.53 blue 0.46
  45.                   colour red 0.85 green 0.75 blue 0.35]
  46.     }
  47.     scale <0.25 0.25 0.25>
  48.     specular 0.1 roughness 0.5 // Very dull
  49.     ambient 0.1
  50.     diffuse 0.5
  51. }
  52.  
  53. #declare RoseWood = texture {
  54.     DMFWood3
  55.     rotate <0 875 0>              // For x cylinder on reelseat (almost 90)
  56.     ambient 0.35
  57.     specular 0.75 roughness 0.075
  58.     reflection 0.12
  59. }
  60.  
  61. // Torus, Outer 2.23, inner 2.075.
  62. // Used as beaded rim on flyreel frame
  63. #declare Split_Torus =
  64.     intersection {
  65.         quartic {
  66.            <    1.000000 0.000000 0.000000 0.000000 2.000000
  67.                 0.000000 0.000000 2.000000 0.000000 -9.368125
  68.                 0.000000 0.000000 0.000000 0.000000 0.000000
  69.                 0.000000 0.000000 0.000000 0.000000 0.000000
  70.                 1.000000 0.000000 0.000000 2.000000 0.000000
  71.                 9.337500 0.000000 0.000000 0.000000 0.000000
  72.                 1.000000 0.000000 -9.368125 0.000000 21.797227
  73.             >
  74.         }
  75.     plane {<0 1 0> 0}
  76.     rotate <90 0 0>
  77. }
  78.  
  79.  
  80.  
  81.  
  82.  
  83. #declare FlyRod = composite {
  84.  
  85.     // Cork flyrod handle
  86.     object {
  87.         union {
  88.             intersection { X_Disk }
  89.             quadric { Ellipsoid translate <1 0 0> }
  90.         }
  91.         color Red
  92.         texture { Cork scale <2 1 1> }
  93.         scale <5 1 1>
  94.     }
  95.  
  96.     // Reelseat
  97.     object {
  98.         intersection { X_Disk scale <2 0.75 0.75> translate <-7 0 0> }
  99.         color Orange
  100.         texture { RoseWood
  101.             DMFWood3
  102.             rotate <0 90 0>
  103.             ambient 0.25
  104.             specular 0.95 roughness 0.0025
  105.         }
  106.     }
  107.  
  108.  
  109.     // Metal Cap and band for end of reelseat
  110.     object {
  111.         union {
  112.             intersection { X_Disk scale <0.5 0.78 0.76> translate <-9.5 0 0> } // Cap
  113.             intersection { X_Disk scale <0.05 0.82 0.82> translate <-9.05 0 0> }
  114.             quadric { Ellipsoid
  115.                 texture {
  116.                     Nickle_Silver
  117.                     bump_map {
  118.                             <0 -1 1>
  119.                             gif "c:\pov\maps\monogram.gif"
  120.                             bump_size -10
  121.                             interpolate 4
  122.                     }
  123.                     rotate <0 180 0>
  124.                     translate <0 -0.5 0.5>
  125.                     scale <1 2.5 2.5>      // Monogram is smallish ;-]
  126.                 }
  127.                 scale <0.20 0.80 0.80> translate <-10 0 0>
  128.             }
  129.  
  130.             intersection { X_Disk scale <0.05 0.82 0.82> translate <-6.7 0 0> } // Band
  131.             intersection { X_Disk scale <0.25 0.78 0.76> translate <-6.5 0 0> } // Band
  132.             intersection { X_Disk scale <0.05 0.82 0.82> translate <-6.3 0 0> } // Band
  133.         }
  134.         color Yellow
  135.         texture {
  136.             Nickle_Silver
  137.         }
  138.     }
  139.  
  140.     object {
  141.         // Bamboo flyrod (sorry, it's not tapered)
  142.         intersection { Hexagon
  143.             rotate <30 0 0>
  144.         }
  145.         color Green
  146.         texture {
  147.             Shiny
  148.             gradient <1 0 0>
  149.             color_map {
  150.                 [0.0 0.02 color red 0.35 color red 0.35]
  151.                 [0.02 0.03 color Yellow color Yellow]
  152.                 [0.03 0.07 color red 0.35 color red 0.35]
  153.                 [0.07 0.08 color Yellow color Yellow]
  154.                 [0.08 0.1 color red 0.35 color red 0.35]
  155.                 [0.1 0.3 color Bamboo1 color Bamboo2]
  156.                 [0.3 0.4 color Bamboo2 color Bamboo2]
  157.                 [0.4 1.0 color Bamboo2 color Bamboo1]
  158.             }
  159.             scale <0.1 1 1>
  160.             translate <-1 0 0>
  161.         }
  162.  
  163.         scale <100 0.25 0.25>
  164.         translate <110 0 0>
  165.     }
  166.  
  167. }    // end of flyrod composite
  168.  
  169.  
  170. // A round headed screw.  I tried using a gradient for the slot, but
  171. // this looks *much* better.
  172. #declare Screw = difference {
  173.     quadric { Ellipsoid }
  174.     box { UnitBox scale <1 0.1 1> translate <0 0 -1>}
  175.     scale <1 1 0.2>       // Scale to unit proportions
  176.     scale <.05 .05 .05>     // Now, rescale to *useable* proportions
  177.  
  178. }
  179.  
  180. // This is the reel release lever
  181. #declare Release = union {
  182.     box { UnitBox scale <0.15 0.0875 0.015> }
  183.     intersection { Z_Disk scale <0.0875 0.0875 0.015> translate <-0.15 0 0>}
  184.     translate <-0.15 0 0>    // Right edge at x=0
  185. }
  186.  
  187. #declare UL_Brace_Corner = difference {
  188.     box { UnitBox}
  189.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 1 1>}
  190.     scale <0.075 0.25 0.25 >
  191. }
  192. #declare UR_Brace_Corner = difference {
  193.     box { UnitBox}
  194.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 1 -1>}
  195.     scale <0.075 0.25 0.25 >
  196. }
  197. #declare LL_Brace_Corner = difference {
  198.     box { UnitBox}
  199.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 -1 1>}
  200.     scale <0.075 0.25 0.25 >
  201. }
  202. #declare LR_Brace_Corner = difference {
  203.     box { UnitBox}
  204.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 -1 -1>}
  205.     scale <0.075 0.25 0.25 >
  206. }
  207.  
  208. #declare Brace =  union {
  209.         box { UnitBox scale <0.075 0.075 0.85 > }
  210.         difference { UL_Brace_Corner translate <0  0.325 -0.6>}
  211.         difference { LL_Brace_Corner translate <0 -0.325 -0.6>}
  212.         difference { UR_Brace_Corner translate <0  0.325 +0.6>}
  213.         difference { LR_Brace_Corner translate <0 -0.325 +0.6>}
  214.     }
  215.  
  216. #declare Reel = composite {
  217.  
  218.     // Flyline (off the reel)
  219.     object {
  220.         union {
  221.             intersection { X_Disk
  222.                 scale <30 0.055 0.055>
  223.                 translate <30 -2 0>
  224.        //         rotate <0 0 5>
  225.             }
  226.             intersection { X_Disk
  227.                 scale <30 0.055 0.055>
  228.                 translate <60 -2 0>
  229.             }
  230.         }
  231.         texture { color White }
  232.     }
  233.  
  234.  
  235.  
  236.     // Inner spool w/line on it
  237.     // This is simply a Z_Disk with separate textures on each part.
  238.     // The gradients are to simulate the flyline
  239.     object {
  240.         intersection {
  241.             quadric { Cylinder_Z
  242.                 texture {
  243.                     gradient <0 0 1>
  244.                     color_map {
  245.                         [0.0  0.25 color DimGray color White]
  246.                         [0.25 0.75 color White color White]
  247.                         [0.75  1.0 color White  color DimGray  ]
  248.                     }
  249.                     scale <1 1 0.1 >
  250.                     ambient 0.15
  251.                 }
  252.             }
  253.             plane { <0 0 1> -1 inverse
  254.                 texture {
  255.                     wood
  256.                     turbulence 0
  257.                     color_map {
  258.                         [0.0  0.25 color DimGray color White]
  259.                         [0.25 0.75 color White color White]
  260.                         [0.75  1.0 color White  color DimGray  ]
  261.                     }
  262.                     scale <0.1 0.1 1 >
  263.                     ambient 0.15
  264.                 }
  265.             }
  266.  
  267.             plane { <0 0 1>  1
  268.                 texture {
  269.                     wood
  270.                     turbulence 0
  271.                     color_map {
  272.                         [0.0  0.25 color DimGray color White]
  273.                         [0.25 0.75 color White color White]
  274.                         [0.75  1.0 color White  color DimGray  ]
  275.                     }
  276.                     scale <0.1 0.1 1 >
  277.                     ambient 0.15
  278.                 }
  279.             }
  280.         }
  281.         color Blue
  282.         scale <1.65 1.65 1>
  283.     }
  284.  
  285.     // Flanges
  286.     object {
  287.         difference {
  288.             difference {
  289.                 union {
  290.                     intersection { Z_Disk scale <2 2 0.15> translate <0 0 -1> }
  291.                     intersection { Z_Disk scale <2 2 0.15> translate <0 0  1> }
  292.                 }
  293.                 union {
  294.                     intersection { Z_Disk scale <1.95 1.95 0.075> translate <0 0 -1.15> }
  295.                     intersection { Z_Disk scale <1.95 1.95 0.075> translate <0 0  1.15> }
  296.                 }
  297.             }
  298.             union {
  299.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> }
  300.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  22.5>}
  301.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  45>}
  302.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  67.5>}
  303.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  90>}
  304.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 112.5>}
  305.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 135>}
  306.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 157.5>}
  307.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 180>}
  308.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 202.5>}
  309.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 225>}
  310.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 247.5>}
  311.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 270>}
  312.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 292.5>}
  313.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 315>}
  314.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 337.5>}
  315.  
  316.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> }
  317.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  22.5>}
  318.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  45>}
  319.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  67.5>}
  320.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  90>}
  321.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 112.5>}
  322.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 135>}
  323.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 157.5>}
  324.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 180>}
  325.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 202.5>}
  326.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 225>}
  327.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 247.5>}
  328.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 270>}
  329.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 292.5>}
  330.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 315>}
  331.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 337.5>}
  332.             }
  333.         }
  334.         bounded_by { intersection { Z_Disk scale <2.1 2.1 1.2> } }
  335.         color Cyan
  336.         texture { Reel_Texture }
  337.     }
  338.  
  339.     // Handle
  340.     object {
  341.         union {
  342.             intersection { Z_Disk scale <0.2 0.2 0.5>
  343.                 translate <0 1.5 -1.5>
  344.                 rotate <0 0 22.5>
  345.             }
  346.             // Button on the end of the handle
  347.             quadric { Ellipsoid  scale <0.15 0.15 0.025>
  348.                 translate <0 1.5 -2>
  349.                 rotate <0 0 22.5>
  350.                 texture { Nickle_Silver }
  351.             }
  352.         }
  353.         color Magenta
  354.         texture {
  355.             specular 1  roughness 0.05
  356.             phong 1 phong_size 150
  357.             color Gray25
  358.         }
  359.     } // end of handle
  360.  
  361.  
  362.     // Hub cap
  363.     object {
  364.         union {
  365.             intersection { Z_Disk scale <0.35 0.35 0.1>  }
  366.             quadric { Ellipsoid scale <0.25 0.25 0.15> }
  367.             union { Release translate <-0.25 0 0>}
  368.             union {
  369.                 difference { Screw translate < 0.25 0 -0.1> }
  370.                 difference { Screw translate <-0.25 0 -0.1> }
  371.                 rotate <0 0 60>
  372.             }
  373.         }
  374.         bounded_by { sphere { <0 0 0> 0.75 } }
  375.         translate <0 0 -1.1>
  376.         texture { Nickle_Silver }
  377.     } // end of hub cap
  378.  
  379.  
  380.     // Reel Frame
  381.     object {
  382.         union {
  383.             difference {
  384.                 union {
  385.                     intersection { Z_Disk scale <2.25 2.25 0.10> translate <0 0 -1> }
  386.                     intersection { Z_Disk scale <2.25 2.25 0.10> translate <0 0  1> }
  387.                 }
  388.                 union {
  389.                     quadric { Cylinder_Z scale <2.075 2.075 1> }
  390.                     quadric { Cylinder_Z scale <2.075 2.075 1> }
  391.                 }
  392.             }
  393.             // Crossbars
  394.             union { Brace translate < 2.1725 0 0> }
  395.             union { Brace rotate <0 0 90> translate <0 -2.1725 0> }
  396.             union { Brace translate <-2.1725 0 0> }
  397.             // Beaded rim
  398.             intersection { Split_Torus translate <0 0 -1.10>}
  399.             intersection { Split_Torus rotate <180 0 0> translate <0 0 +1.10>}
  400.         }
  401.         color Red
  402.         texture { Reel_Texture }
  403.         bounded_by { intersection { Z_Disk scale <2.4 2.4 1.21> } }
  404.     } // end of reel frame
  405.  
  406.  
  407.     // Reel Foot
  408.     object {
  409.         union {
  410.             intersection {
  411.                 difference {
  412.                     intersection {X_Disk scale <1.75 0.77 0.77> }
  413.                     intersection {X_Disk scale <1.85 0.75 0.75> }
  414.                 }
  415.                 plane { <0 1 0> -0.40 }
  416.                 quadric { Cylinder_Y scale <1.75 0.75 1>}
  417.             }
  418.             box { UnitBox scale <0.5 0.075 0.50> translate <0 -0.825 0> }
  419.             box { UnitBox scale <0.25 0.075 0.85> translate <0 -0.975 0> color Green }
  420.         }
  421.         color Orange
  422.         texture { Reel_Texture }
  423.         bounded_by {
  424.             box { UnitBox scale <1.85 1 0.85> }
  425.         }
  426.         translate <0 2.77 0>
  427.     }  // end of reel foot
  428. }
  429.  
  430.  
  431.  
  432.  
  433. // White reflecting plane to highlight the metal textures
  434. //object { plane { <0 0 1> -500 rotate <0 -45 0> texture { color White ambient 1} } }
  435.  
  436.  
  437.  
  438.  
  439. // Wooded environment map, reflected in the end cap on the reelseat.
  440. // Looks sort of like leaves and branches, if you use your imagination.
  441. #declare Woods = object { plane { <0 0 1> -2000 }
  442.     texture {
  443.         bozo
  444.         turbulence 0.25
  445.         color_map {
  446.             [0.0 0.25 color ForestGreen color ForestGreen]
  447.             [0.25 0.35 color ForestGreen color GreenYellow]
  448.             [0.35 0.50 color GreenYellow color ForestGreen]
  449.             [0.50 0.8 color ForestGreen color green 0.1]
  450.             [0.80 1.0 color green 0.1 color ForestGreen]
  451.         }
  452.         scale <10 10 10>
  453.     }
  454.     texture {
  455.         marble
  456.         turbulence 0.65
  457.         octaves 3
  458.         color_map {
  459.             [0.0 0.7 color Clear color Clear]
  460.             [0.7 1.0 color DarkWood color DarkWood]
  461.         }
  462.         scale <50 100 1>
  463.     }
  464.     texture {
  465.         bozo
  466.         turbulence 0.25
  467.         color_map {
  468.             [0.0 0.25 color ForestGreen color ForestGreen]
  469.             [0.25 0.35 color ForestGreen color GreenYellow]
  470.             [0.35 0.50 color Clear color Clear]
  471.             [0.50 0.8 color ForestGreen color green 0.1]
  472.             [0.80 1.0 color green 0.1 color ForestGreen]
  473.         }
  474.  
  475.     scale <125 250 1>
  476.     }
  477. }
  478.  
  479. object { Woods                  }
  480. object { Woods rotate <0  60 0> }
  481. object { Woods rotate <0 -60 0> }
  482.  
  483. #declare DarkSummerSky = color red 0.055 green 0.175 blue 0.22
  484. // Sky sphere
  485. object { quadric { Ellipsoid scale <10000 5000 10000> } texture {0.035 color DarkSummerSky ambient 1 diffuse 0} }
  486.  
  487. composite {
  488.     composite {Reel translate <-8 -2.75  0> }
  489.     composite {FlyRod}
  490.     rotate <0 -65 0>
  491. }
  492.  
  493. // Simple plane to simulate water, but only in the reflection
  494. object { plane { <0 1 0> -2000 }
  495.     texture {
  496.         waves 1
  497.         frequency 100
  498.         scale <25 1 25>
  499.         translate <-1000 0 -1000>
  500.         reflection 0.25
  501.         specular 1 roughness 0.01
  502.         color red .11 green .35 blue 0.44
  503.         ambient .5
  504.     }
  505. }
  506.